export function getAddress(row) {
  // 客户地址拼接
  return (row.provinceName ? row.provinceName : '') + (row.cityName ? row.cityName : '') + (row.districtsName ? row.districtsName : '') + (row.streetName ? row.streetName : '') + (row.detailedAddress ? row.detailedAddress : '')
}
export function getDictName(val, list) {
  // 获取字典值的name
  if (!val) {
    return ''
  }
  let ary = []
  if (Array.isArray(val)) {
    ary = val
  } else {
    ary = val.split(',')
  }
  if (ary.length > 1) {
    const resAry = []
    for (const i in val) {
      resAry.push(getDictName(val[i], list))
    }
    return resAry.join(',')
  } else {
    const obj = list.find(e => { return e.dictCode === ary[0] })
    return obj ? obj.dictName : ary[0]
  }
}
